import Vue from 'vue'
import VueRouter from 'vue-router'

import List from '@/views/List.vue'
import Home from '@/views/Home.vue'
import Login from '@/views/Login.vue'
import Register from '@/views/Register.vue'

Vue.use(VueRouter)

const routes = [
  //  首页列表
  {
    path: '/',
    name: 'list',
    component: List,
    
  },
  //  编辑区路由
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  //  登录/注册
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/register',
    name:'register',
    component: Register
  }
]

const router = new VueRouter({
  routes
})

export default router
